{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        {include file="public/tophead" /}
        {include file="public/top" /}
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="example">
                        <table data-toggle="table" data-striped="false">
                            <thead>
                            <tr>
                                <th>id</th>
                                <th>名称</th>
                                <th>控制器</th>
                                <th>函数</th>
                                <th>左边</th>
                                <th>右边</th>
                                <th>管理</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="data" id="v"}
                                <tr id="id{$v.id}" class="gradeA footable-even category1">
                                    <td class="categoryTitle">{$v.id}</td>
                                    <td class="categoryTitle">{:str_repeat("&nbsp;&nbsp;&nbsp;&nbsp;", $v['depth'])}{gt name="$v['depth']" value="0"}┠&nbsp;&nbsp;{/gt}{$v.title}</td>
                                    <td>{$v.controller}</td>
                                    <td>{$v.function}</td>
                                    <td>{if $v.hideleft}显示{else}隐藏{/if}</td>
                                    <td>{if $v.hideright}显示{else}隐藏{/if}</td>
                                    <td>
                                        <div class="btn-group">
                                            <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作 <span class="caret"></span></button>
                                            <ul class="dropdown-menu">
                                                <li><a onclick="add('{:url('category/add',['typeid' => $v['id'],'url' => -1])}')" href="javascript:void(0);">添加</a></li>
                                                <li><a onclick="add('{:url('category/add',['id' => $v['id'],'url' => -1])}')" href="javascript:void(0);">修改</a></li>
                                                <li><a href="{:url('category/hide', ['id' => $v['id'], 'hide' => '1'])}">左边{if $v.hideleft}显示{else}隐藏{/if}</a></li>
                                                <li><a href="{:url('category/hide', ['id' => $v['id'], 'hide' => '2'])}">右边{if $v.hideright}显示{else}隐藏{/if}</a></li>
                                                {if $v.id gt 9}
                                                <li class="divider"></li>
                                                <li><a href="javascript:;" onclick="del({$v.id})">删除</a></li>
                                                {/if}
                                            </ul>
                                        </div>
                                    </td>
                                </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.css"}
{load href="__STYLE__/admin/plugins/bootstrap/bootstrap-table.min.js"}
<script type="text/javascript">
    function add(url){
        layer.open({
            type: 2,
            title: '菜单信息',
            shadeClose: false,
            shade: 0.2,
            area: ['95%', '80%'],
            skin:'shangchuantup',
            content: url
        });
    }
    function del(id){
        swal_del(id,"{:url('del')}",{title: '此菜单'})
    }
</script>